this.BX=this.BX||{};(function(t,e,i,n){"use strict";var s,r,a,l,o;var u=function(t){babelHelpers.inherits(e,t);function e(){var t;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var s=arguments.length>1?arguments[1]:undefined;babelHelpers.classCallCheck(this,e);t=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this));t.header=i===null||i===void 0?void 0:i.header;t.node=i===null||i===void 0?void 0:i.node;t.number=s;t.isFirst=(i===null||i===void 0?void 0:i.isFirst)||"";t.isLast=(i===null||i===void 0?void 0:i.isLast)||"";t["class"]=n.Type.isString(i===null||i===void 0?void 0:i.nodeClass)?i.nodeClass:null;t.backgroundColor=n.Type.isString(i===null||i===void 0?void 0:i.backgroundColor)?i.backgroundColor:null;t.layout={container:null};return t}babelHelpers.createClass(e,[{key:"getHeader",value:function t(){if(n.Type.isString(this.header)){return n.Tag.render(s||(s=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="ui-stepbystep__section-item--title">',"</div>\n\t\t\t"])),this.header)}if(n.Type.isObject(this.header)){var e=n.Tag.render(r||(r=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="ui-stepbystep__section-item--title">\n\n\t\t\t\t</div>\n\t\t\t'])));if(this.header.title){e.innerText=this.header.title}if(n.Type.isString(this.header.hint)){var i=n.Tag.render(a||(a=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t\t<span data-hint="','" class="ui-hint ui-stepbystep__section-item--hint">\n\t\t\t\t\t\t<i class="ui-hint-icon"></i>\n\t\t\t\t\t</span>\n\t\t\t\t'])),this.header.hint);e.appendChild(i);this.initHint(e)}return e}return""}},{key:"initHint",value:function t(e){BX.UI.Hint.init(e)}},{key:"getContent",value:function t(){if(this.node){return n.Tag.render(l||(l=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="ui-stepbystep__section-item--content">\n\t\t\t\t\t',"\n\t\t\t\t</div>\n\t\t\t"])),this.node)}return""}},{key:"getContainer",value:function t(){if(!this.layout.container){this.layout.container=n.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="ui-stepbystep__section-item">\n\t\t\t\t\t<div class="ui-stepbystep__section-item--counter">\n\t\t\t\t\t\t<div class="ui-stepbystep__section-item--counter-number '," ",'">\n\t\t\t\t\t\t\t<span>','</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ui-stepbystep__section-item--information">\n\t\t\t\t\t\t',"\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t"])),this.isFirst,this.isLast,this.number,this.getHeader(),this.getContent());if(this.backgroundColor){this.layout.container.style.backgroundColor=this.backgroundColor}if(this["class"]){this.layout.container.classList.add(this["class"])}}return this.layout.container}}]);return e}(e.EventEmitter);var c;var h=function(){function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,t);this.target=e.target||null;this.content=e.content||null;this.contentWrapper=null;this.items=[];this.counter=0}babelHelpers.createClass(t,[{key:"getItem",value:function t(e){if(e instanceof u){return e}this.counter++;if(this.counter===1){e.isFirst="--first"}if(this.counter===this.content.length){e.isLast="--last"}e=new u(e,this.counter);if(this.items.indexOf(e)===-1){this.items.push(e)}return e}},{key:"getContentWrapper",value:function t(){var e=this;if(!this.contentWrapper){this.contentWrapper=n.Tag.render(c||(c=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="ui-stepbystep__content ui-stepbystep__scope"></div>\n\t\t\t'])));this.content.map((function(t){t.html.map((function(t){e.contentWrapper.appendChild(e.getItem(t).getContainer())}))}))}return this.contentWrapper}},{key:"init",value:function t(){if(this.target&&this.content){n.Dom.clean(this.target);this.target.appendChild(this.getContentWrapper())}}}]);return t}();t.StepByStep=h})(this.BX.UI=this.BX.UI||{},BX.Event,BX,BX);
//# sourceMappingURL=stepbystep.bundle.map.js